package com.ykzb.project.dao.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ykzb.project.dao.IProjectBidDao;
import com.ykzb.project.dao.IProjectDao;
import com.ykzb.project.mapper.CategoryMapper;
import com.ykzb.project.mapper.ProjectBidMapper;
import com.ykzb.project.mapper.ProjectMapper;
import com.ykzb.project.model.ProjectBid;
import com.ykzb.project.model.ProjectInfo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.util.CollectionUtils;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by mac on 2017/3/31.
 */
@SuppressWarnings("restriction")
@Repository("projectBidDao")
public class ProjectBidDaoImpl implements IProjectBidDao {

    @Autowired
    private ProjectBidMapper projectBidMapper;

    @Override
    public void insert(ProjectBid bid) throws Exception {
        projectBidMapper.insert(bid);
    }

    @Override
    public List<ProjectBid> selectProjectBidByProjectId(Long id) throws Exception {
        if (id==null){
            return null;
        }else{
            return projectBidMapper.selectProjectBidByProjectId(id);
        }
    }


}
